import { IPermissionsList, IUserInfoDetail } from '@/api/login/type'

// export type LayoutType = 'vertical' | 'classic' | 'transverse' | 'columns'
export type LayoutType = 'vertical' | 'classic'
export type LanguageType = 'zh' | 'en' | null

/* 主题 */
export type ThemeType = 'light' | 'dark'

/* AppState */
export interface AppState {
  language: LanguageType
  primary: string
  isDark: boolean
  isCollapse: boolean
  breadcrumb: boolean
  breadcrumbIcon: boolean
  tabs: boolean
  tabsIcon: boolean
  footer: boolean
}

/* UserState */
export interface UserState {
  // token
  token: string
  // 用户信息
  userInfo: IUserInfoDetail
  // 用户角色
  userRoleName: string
  // 用户权限列表
  permissions: IPermissionsList
  // 是否存在用户信息
  hasUserInfo: boolean
  // 是否是管理员
  isAdminCount: boolean
}

/* tabsMenuProps */
export interface TabsMenuProps {
  icon: string
  title: string
  path: string
  name: string
  close: boolean
  isKeepAlive: boolean
}

/* TabsState */
export interface TabsState {
  tabsMenuList: TabsMenuProps[]
}

/* KeepAliveState */
export interface KeepAliveState {
  keepAliveName: string[]
}
